﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddTrainingCourseGroup.ascx.vb"
    Inherits="WebForm_ManageTrainingCourse_AddTrainingCourseGroup" %>
<%@ Register Src="SearchTrainingCourseControl.ascx" TagName="SearchTrainingCourseControl"
    TagPrefix="uc1" %>
<asp:FormView ID="FV" runat="server" DataKeyNames="Id" DataSourceID="ObjectDataSource1">
    <ItemTemplate>
        <table>
            <tr>
                <td colspan="2">
                    <asp:ValidationSummary ID="sum_AddTrainingCourseGroupSave" runat="server" DisplayMode="List"
                        ShowMessageBox="True" ShowSummary="true" ValidationGroup="AddTrainingCourseGroupSave" />
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblUOrganizationID" runat="server" Text="<%$ Resources:UOrganizationID %>"></asp:Label>
                </td>
                <td colspan="3">
                    <asp:DropDownList ID="ddlUOrganizationID" runat="server"  OnDataBinding="ddlUOrganizationID_DataBinding"
                        DataTextField="OrganizationName" DataValueField="UOrganizationID" OnDataBound="ddlUOrganizationID_DataBound"
                        SelectedValue='<%# Bind("UOrganizationID") %>'>
                    </asp:DropDownList>
                    <asp:ObjectDataSource ID="ObjectDataSource_UOrganizationData" runat="server" OldValuesParameterFormatString="original_{0}"
                        SelectMethod="BLL_Select" TypeName="BLL_BLL_VOrganizationData"></asp:ObjectDataSource>
                    <asp:RequiredFieldValidator ID="chk_ddlUOrganizationID" runat="server" ControlToValidate="ddlUOrganizationID"
                        Display="None" ErrorMessage="<%$ Resources:UOrganizationIDRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblGroupName" runat="server" Text="<%$ Resources:GroupName %>"></asp:Label>
                </td>
                <td colspan="3">
                    <asp:TextBox ID="txtGroupName" runat="server" MaxLength="50" Width="100%" Text='<%# Bind("GroupName") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtGroupName" runat="server" ControlToValidate="txtGroupName"
                        Display="None" ErrorMessage="<%$ Resources:GroupNameRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td width="20%" align="right">
                    <asp:Label ID="lblGroupType" runat="server" Text="<%$ Resources:GroupType %>"></asp:Label>
                </td>
                <td width="30%">
                    <asp:DropDownList ID="ddlGroupType" runat="server" DataSourceID="SqlDataSource1"
                        DataTextField="Text" DataValueField="Value" OnDataBound="ddlGroupType_DataBound"
                        SelectedValue='<%# Bind("GroupType") %>' OnSelectedIndexChanged="ddlGroupType_SelectedIndexChanged" AutoPostBack="true">
                    </asp:DropDownList>
                    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:connStr %>"
                        SelectCommand="SELECT Value,Text 
FROM CodeMapping
WHERE TableName='TrainingCourseGroup' AND ColumnName='GroupType'
AND Value&lt;&gt;'W'
ORDER BY Sequence "></asp:SqlDataSource>
                    <asp:RequiredFieldValidator ID="chk_ddlGroupType" runat="server" ControlToValidate="ddlGroupType"
                        Display="None" ErrorMessage="<%$ Resources:GroupTypeRequired %>" ValidationGroup="AddTrainingCourseGroupSave"
                        InitialValue="0"></asp:RequiredFieldValidator>
                    <asp:RequiredFieldValidator ID="chk_ddlGroupType0" runat="server" ControlToValidate="ddlGroupType"
                        Display="None" ErrorMessage="<%$ Resources:GroupTypeRequired %>" InitialValue="0"
                        ValidationGroup="AddCourse"></asp:RequiredFieldValidator>
                </td>
                <td width="20%" align="right">
                    <asp:Label ID="lblAllHour" runat="server" Text="<%$ Resources:AllHour %>"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtAllHour" runat="server" MaxLength="8" Text='<%# Bind("AllHour") %>' Enabled="false"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtAllHour" runat="server" ControlToValidate="txtAllHour"
                        Display="None" ErrorMessage="<%$ Resources:AllHourRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="chk_AllHour2" runat="server" ControlToValidate="txtAllHour"
                        Display="None" ErrorMessage="<%$ Resources:AllHourOut %>" MaximumValue="99999999"
                        MinimumValue="1" Type="Integer" ValidationGroup="AddTrainingCourseGroupSave"></asp:RangeValidator>
                </td>
            </tr>
            <tr>
                <td align="right" width="20%">
                    <asp:Label ID="lblPersonLimit" runat="server" Text="<%$ Resources:PersonLimit %>"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtPersonLimit" runat="server" MaxLength="8" Text='<%# Bind("PersonLimit") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtPersonLimit" runat="server" ControlToValidate="txtPersonLimit"
                        Display="None" ErrorMessage="<%$ Resources:PersonLimitRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="chk_txtPersonLimit2" runat="server" ControlToValidate="txtPersonLimit"
                        Display="None" ErrorMessage="<%$ Resources:PersonLimitOut %>" MaximumValue="99999999"
                        MinimumValue="1" Type="Integer" ValidationGroup="AddTrainingCourseGroupSave"></asp:RangeValidator>
                </td>
                <td align="right" width="20%">
<%--                    <asp:Label ID="lblCandidate" runat="server" Text="<%$ Resources:Candidate %>"></asp:Label>
--%>                </td>
                <td>
<%--                    <asp:TextBox ID="txtCandidate" runat="server" MaxLength="8" Text='<%# Bind("Candidate") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtCandidate" runat="server" ControlToValidate="txtCandidate"
                        Display="None" ErrorMessage="<%$ Resources:CandidateRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="chk_txtCandidate2" runat="server" ControlToValidate="txtCandidate"
                        Display="None" ErrorMessage="<%$ Resources:CandidateOut %>" MaximumValue="99999999"
                        MinimumValue="1" Type="Integer" ValidationGroup="AddTrainingCourseGroupSave"></asp:RangeValidator>
--%>                </td>
            </tr>
            <tr>
                <td align="right" width="20%">
                    <asp:Label ID="lblClassPlace" runat="server" Text="<%$ Resources:ClassPlace %>"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtClassPlace" runat="server" MaxLength="50" Text='<%# Bind("ClassPlace") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtClassPlace" runat="server" ControlToValidate="txtClassPlace"
                        Display="None" ErrorMessage="<%$ Resources:ClassPlaceRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                </td>
                <td align="right" width="20%">
                    <asp:Label ID="lblOrg" runat="server" Text="<%$ Resources:Org %>"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtOrg" runat="server" MaxLength="50" Text='<%# Bind("Org") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="chk_txtOrg" runat="server" ControlToValidate="txtOrg"
                        Display="None" ErrorMessage="<%$ Resources:OrgRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblRegStartDate" runat="server" Text="<%$ Resources:RegStartDate %>"></asp:Label>
                </td>
                <td>
                    <My:CalendarTextBox ID="txtRegStartDate" runat="server" Text='<%#Bind("RegStartDate") %>' />
                    <%--                    <asp:TextBox ID="txtRegStartDate" runat="server" Text='<%# Bind("RegStartDate","{0:d}") %>'
                        MaxLength="10"></asp:TextBox>--%>
                    <%--                    <ajaxToolkit:CalendarExtender ID="CalRegStartDate" runat="server" TargetControlID="txtRegStartDate">
                    </ajaxToolkit:CalendarExtender>--%>
                    <asp:RequiredFieldValidator ID="chk_txtRegStartDate" runat="server" ControlToValidate="txtRegStartDate"
                        Display="None" ErrorMessage="<%$ Resources:RegStartDateRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="chk_txtRegStartDate2" runat="server" ControlToValidate="txtRegStartDate"
                        Display="None" ErrorMessage="<%$ Resources:RegStartDateOut %>" Operator="DataTypeCheck"
                        Type="Date" ValidationGroup="AddTrainingCourseGroupSave"></asp:CompareValidator>
                </td>
                <td align="right">
                    <asp:Label ID="lblRegEndDate" runat="server" Text="<%$ Resources:RegEndDate %>"></asp:Label>
                </td>
                <td>
                    <My:CalendarTextBox ID="txtRegEndDate" runat="server" Text='<%#Bind("RegEndDate") %>' />
                    <%--                    <asp:TextBox ID="txtRegEndDate" runat="server" Text='<%# Bind("RegEndDate","{0:d}") %>'
                        MaxLength="10"></asp:TextBox>--%>
                    <%--                    <ajaxToolkit:CalendarExtender ID="CalRegEndDate" runat="server" TargetControlID="txtRegEndDate">
                    </ajaxToolkit:CalendarExtender>--%>
                    <asp:RequiredFieldValidator ID="chk_txtRegEndDate" runat="server" ControlToValidate="txtRegEndDate"
                        Display="None" ErrorMessage="<%$ Resources:RegEndDateRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="chk_txtRegEndDate2" runat="server" ControlToValidate="txtRegEndDate"
                        Display="None" ErrorMessage="<%$ Resources:RegEndDateOut %>" Operator="DataTypeCheck"
                        Type="Date" ValidationGroup="AddTrainingCourseGroupSave"></asp:CompareValidator>
                </td>
                <td valign="bottom">
                    <ajaxToolkit:ConfirmButtonExtender ID="cbSave" runat="server" ConfirmText="<%$ Resources:SaveConfirm %>"
                        Enabled="True" meta:resourcekey="cbSave" TargetControlID="btnSave">
                    </ajaxToolkit:ConfirmButtonExtender>
                </td>
            </tr>
            <tr>
                <td align="right">
                    <asp:Label ID="lblStartDate" runat="server" Text="<%$ Resources:StartDate %>"></asp:Label>
                </td>
                <td>
                    <My:CalendarTextBox ID="txtStartDate" runat="server" Text='<%#Bind("StartDate") %>' />
                    <%--<asp:TextBox ID="txtStartDate" runat="server" Text='<%# Bind("StartDate","{0:d}") %>'
                        MaxLength="10"></asp:TextBox>--%>
                    <%--                    <ajaxToolkit:CalendarExtender ID="CalStartDate" runat="server" TargetControlID="txtStartDate">
                    </ajaxToolkit:CalendarExtender>--%>
                    <asp:RequiredFieldValidator ID="chk_txtStartDate" runat="server" ControlToValidate="txtStartDate"
                        Display="None" ErrorMessage="<%$ Resources:StartDateRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="chk_txtStartDate2" runat="server" ControlToValidate="txtStartDate"
                        Display="None" ErrorMessage="<%$ Resources:StartDateOut %>" Operator="DataTypeCheck"
                        Type="Date" ValidationGroup="AddTrainingCourseGroupSave"></asp:CompareValidator>
                </td>
                <td align="right">
                    <asp:Label ID="lblEndDate" runat="server" Text="<%$ Resources:EndDate %>"></asp:Label>
                </td>
                <td>
                    <My:CalendarTextBox ID="txtEndDate" runat="server" Text='<%#Bind("EndDate") %>' />
                    <%--<asp:TextBox ID="txtEndDate" runat="server" Text='<%# Bind("EndDate","{0:d}") %>'
                        MaxLength="10"></asp:TextBox>--%>
                    <%--                    <ajaxToolkit:CalendarExtender ID="CalEndDate" runat="server" TargetControlID="txtEndDate">
                    </ajaxToolkit:CalendarExtender>--%>
                    <asp:RequiredFieldValidator ID="chk_txtEndDate" runat="server" ControlToValidate="txtEndDate"
                        Display="None" ErrorMessage="<%$ Resources:EndDateRequired %>" ValidationGroup="AddTrainingCourseGroupSave"></asp:RequiredFieldValidator>
                    <asp:CompareValidator ID="chk_txtEndDate2" runat="server" ControlToValidate="txtEndDate"
                        Display="None" ErrorMessage="<%$ Resources:EndDateOut %>" Operator="DataTypeCheck"
                        Type="Date" ValidationGroup="AddTrainingCourseGroupSave"></asp:CompareValidator>
                </td>
            </tr>
            <%--報名開始 < 報名結束--%>
            <asp:CompareValidator ID="chk_txtRegEndDate3" runat="server" ControlToCompare="txtRegEndDate"
                ControlToValidate="txtRegStartDate" Display="None" ErrorMessage="<%$ Resources:chk_txtRegEndDate3 %>"
                Operator="LessThanEqual" Type="Date" ValidationGroup="AddTrainingCourseGroupSave"></asp:CompareValidator>
            <%--報名結束 < 場次開始--%>
            <asp:CompareValidator ID="MustGraterThanRegStartDateValidator" runat="server" ControlToValidate="txtRegEndDate"
                Display="None" meta:resourcekey="MustGraterThanRegStartDateValidator" ControlToCompare="txtStartDate"
                Operator="LessThan" ValidationGroup="AddTrainingCourseGroupSave"></asp:CompareValidator>
            <%--場次開始 < 場次結束--%>
            <asp:CompareValidator ID="chk_txtEndDate3" runat="server" ControlToCompare="txtEndDate"
                ControlToValidate="txtStartDate" Display="None" ErrorMessage="<%$ Resources:chk_txtEndDate3 %>"
                Operator="LessThanEqual" Type="Date" ValidationGroup="AddTrainingCourseGroupSave"></asp:CompareValidator>
        </table>
    </ItemTemplate>
</asp:FormView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" InsertMethod="BLL_Insert"
    OldValuesParameterFormatString="original_{0}" SelectMethod="BLL_Select" TypeName="BLL_AddTrainingCourseGroup"
    UpdateMethod="BLL_Update">
    <UpdateParameters>
        <asp:Parameter Name="GroupName" Type="String" />
        <asp:Parameter Name="GroupType" Type="String" />
        <asp:Parameter Name="AllHour" Type="Int32" />
        <asp:Parameter Name="PersonLimit" Type="Int32" />
        <asp:Parameter Name="Candidate" Type="Int32" />
        <asp:Parameter Name="ClassPlace" Type="String" />
        <asp:Parameter Name="Org" Type="String" />
        <asp:Parameter Name="StartDate" Type="DateTime" />
        <asp:Parameter Name="EndDate" Type="DateTime" />
        <asp:Parameter Name="RegStartDate" Type="DateTime" />
        <asp:Parameter Name="RegEndDate" Type="DateTime" />
        <asp:Parameter Name="UOrganizationID" Type="String" />
        <asp:Parameter Name="original_Id" Type="Int32" />
    </UpdateParameters>
    <SelectParameters>
        <asp:Parameter Name="Id" Type="Int32" />
    </SelectParameters>
    <InsertParameters>
        <asp:Parameter Name="GroupName" Type="String" />
        <asp:Parameter Name="GroupType" Type="String" />
        <asp:Parameter Name="AllHour" Type="Int32" />
        <asp:Parameter Name="PersonLimit" Type="Int32" />
        <asp:Parameter Name="Candidate" Type="Int32" />
        <asp:Parameter Name="ClassPlace" Type="String" />
        <asp:Parameter Name="Org" Type="String" />
        <asp:Parameter Name="StartDate" Type="DateTime" />
        <asp:Parameter Name="EndDate" Type="DateTime" />
        <asp:Parameter Name="RegStartDate" Type="DateTime" />
        <asp:Parameter Name="RegEndDate" Type="DateTime" />
        <asp:Parameter Name="UOrganizationID" Type="String" />
        <asp:Parameter Name="LoginUser" Type="String" />
    </InsertParameters>
</asp:ObjectDataSource>
<div align="right">
    <asp:Button ID="btnAddCourse" runat="server" Text="<%$ Resources:AddCourse %>" ValidationGroup="AddCourse" />
    <asp:Button ID="btnSave" runat="server" CommandName="btnSave" meta:resourcekey="btnSave"
        Text="<%$ Resources:Save %>" ValidationGroup="AddTrainingCourseGroupSave" />    
</div>
<My:MyGridView ID="GV" runat="server" AllowHoverSelect="False" AllowPaging="True"
    AllowSorting="True" AutoGenerateColumns="False" DataKeyNames="Id" DataSourceID="ObjectDataSource2"
    EmptyDataText="<%$ Resources:EmptyData %>" MySortDirection="Ascending" SkinID="pager"
    AllowHoverEffect="True">
    <Columns>
        <asp:BoundField DataField="CourseName" HeaderText="<%$ Resources:CourseName %>" ReadOnly="True"
            SortExpression="CourseName" />
        <asp:BoundField DataField="Hour" HeaderText="<%$ Resources:CourseHour %>" ReadOnly="True"
            SortExpression="Hour" />
        <%--<asp:BoundField DataField="TeacherName" HeaderText="<%$ Resources:TeacherName %>"/>--%>
        <asp:TemplateField HeaderText="<%$ Resources:TeacherName %>">
            <EditItemTemplate>
                <asp:TextBox ID="txtTeacherName" runat="server" Text='<%#Bind("TeacherName") %>'></asp:TextBox>
            </EditItemTemplate>
            <ItemTemplate>
                <%#Eval("TeacherName") %>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="<%$ Resources:StartTime %>" SortExpression="StartTime">
            <EditItemTemplate>
                <asp:TextBox ID="txtStartHour" runat="server" Text='<%# Bind("StartTime") %>' Width="40px"
                    OnDataBinding="txtStartHour_DataBinding" MaxLength="2"></asp:TextBox>
                <asp:Label ID="Label3" runat="server" Text="<%$ Resources:Hour %>"></asp:Label>
                <asp:TextBox ID="txtStartMinute" runat="server" Text='<%# Bind("StartTime") %>' Width="40px"
                    OnDataBinding="txtStartMinute_DataBinding" MaxLength="2"></asp:TextBox>
                <asp:Label ID="Label4" runat="server" Text="<%$ Resources:Minute %>"></asp:Label>
                <asp:RequiredFieldValidator ID="chk_StartHour" runat="server" ControlToValidate="txtStartHour"
                    Display="None" ErrorMessage="<%$ Resources:StartHourRequired %>" ValidationGroup="Edit"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="chk_StartHour2" runat="server" ControlToValidate="txtStartHour"
                    Display="None" ErrorMessage="<%$ Resources:StartTime0_23 %>" MaximumValue="23"
                    MinimumValue="0" Type="Integer" ValidationGroup="Edit"></asp:RangeValidator>
                <asp:RequiredFieldValidator ID="chk_StartMinute" runat="server" ControlToValidate="txtStartMinute"
                    Display="None" ErrorMessage="<%$ Resources:StartMinuteRequired %>" ValidationGroup="Edit"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="chk_StartMinute2" runat="server" ControlToValidate="txtStartMinute"
                    Display="None" ErrorMessage="<%$ Resources:StartTime0_59 %>" MaximumValue="59"
                    MinimumValue="0" Type="Integer" ValidationGroup="Edit"></asp:RangeValidator>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("StartTime") %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="<%$ Resources:EndTime %>" SortExpression="EndTime">
            <EditItemTemplate>
                <asp:TextBox ID="txtEndHour" runat="server" Text='<%# Bind("EndTime") %>' Width="40px"
                    OnDataBinding="txtEndHour_DataBinding" MaxLength="2"></asp:TextBox>
                <asp:Label ID="Label5" runat="server" Text="<%$ Resources:Hour %>"></asp:Label>
                <asp:TextBox ID="txtEndMinute" runat="server" Text='<%# Bind("EndTime") %>' Width="40px"
                    OnDataBinding="txtEndMinute_DataBinding" MaxLength="2"></asp:TextBox>
                <asp:Label ID="Label6" runat="server" Text="<%$ Resources:Minute %>"></asp:Label>
                <asp:RequiredFieldValidator ID="chk_EndHour" runat="server" ControlToValidate="txtEndHour"
                    Display="None" ErrorMessage="<%$ Resources:EndHourRequired %>" ValidationGroup="Edit"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="chk_EndHour2" runat="server" ControlToValidate="txtEndHour"
                    Display="None" ErrorMessage="<%$ Resources:EndTime0_23 %>" MaximumValue="23"
                    MinimumValue="0" Type="Integer" ValidationGroup="Edit"></asp:RangeValidator>
                <asp:RequiredFieldValidator ID="chk_EndMinute" runat="server" ControlToValidate="txtEndMinute"
                    Display="None" ErrorMessage="<%$ Resources:EndMinuteRequired %>" ValidationGroup="Edit"></asp:RequiredFieldValidator>
                <asp:RangeValidator ID="chk_EndMinute2" runat="server" ControlToValidate="txtEndMinute"
                    Display="None" ErrorMessage="<%$ Resources:EndTime0_59 %>" MaximumValue="59"
                    MinimumValue="0" Type="Integer" ValidationGroup="Edit"></asp:RangeValidator>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# Bind("EndTime") %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <asp:LinkButton ID="lbtnUpdate" runat="server" CommandName="Update" Text="<%$ Resources:Update %>"
                    ValidationGroup="Edit"></asp:LinkButton>
                &nbsp;<asp:LinkButton ID="lbtnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                    Text="<%$ Resources:Cancel %>"></asp:LinkButton>
            </EditItemTemplate>
            <ItemTemplate>
                <asp:LinkButton ID="lbtnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                    Text="<%$ Resources:Edit %>"></asp:LinkButton>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False">
            <ItemTemplate>
                <asp:LinkButton ID="lbtnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                    Text="<%$ Resources:Delete %>"></asp:LinkButton>
                <ajaxToolkit:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server" ConfirmText="<%$ Resources:ConfirmDelete %>"
                    TargetControlID="lbtnDelete">
                </ajaxToolkit:ConfirmButtonExtender>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" />
        </asp:TemplateField>
    </Columns>
</My:MyGridView>
<asp:ObjectDataSource ID="ObjectDataSource2" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="BLL_Select" TypeName="BLL_AddTrainingCourseGroupMapping" UpdateMethod="BLL_Update"
    DeleteMethod="BLL_Delete">
    <DeleteParameters>
        <asp:Parameter Name="original_Id" Type="Int32" />
    </DeleteParameters>
    <UpdateParameters>
        <asp:Parameter Name="StartTime" Type="String" />
        <asp:Parameter Name="EndTime" Type="String" />
        <asp:Parameter Name="TeacherName" Type="String" />
        <asp:Parameter Name="UpdateBy" Type="String" />
        <asp:Parameter Name="original_Id" Type="Int32" />
    </UpdateParameters>
    <SelectParameters>
        <asp:Parameter Name="GroupId" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
<asp:ValidationSummary ID="sum_AddCourse" runat="server" DisplayMode="List" ShowMessageBox="True"
    ShowSummary="False" ValidationGroup="AddCourse" />
<asp:ValidationSummary ID="sum_Edit" runat="server" DisplayMode="List" ShowMessageBox="True"
    ShowSummary="False" ValidationGroup="Edit" />
<uc1:SearchTrainingCourseControl ID="SearchTrainingCourseControl1" runat="server" />
